package org.android;

import org.android.NoGo;

import android.R;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;


public class B2GoAppActivity extends Activity {
	
	
   private ImageButton ToDobutton;
   private ImageView hpforward;

/** Called when the activity is first created. 
 * @return */
   
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.main);
        
       
     //Klick auf Logo = Aufruf der Internetseite
       this.hpforward = (ImageView)this.findViewById(R.id.LogoHomescreen);
       hpforward.setOnClickListener(new View.OnClickListener() {
    	    	   
           public void onClick(View view) {
               Uri uri = Uri.parse("http://www.beratungskompetenz-online.de");
               Intent hpforward = new Intent(Intent.ACTION_VIEW, uri);
               startActivity(hpforward);
        	  
           }
           
       });

       
      //ToDo-Button + Layoutwechsel 
       this.ToDobutton = (ImageButton)this.findViewById(R.id.todo_button);
       ToDobutton.setOnClickListener(new View.OnClickListener() {
    	   
           public void onClick(View v) {
        	   Intent i = new Intent(B2GoAppActivity.this, NoGo.class);
               startActivity(i);
               
        }
        	             
       });
       
                          
   }
}